package com.anli1.controller;


import com.anli1.entity.pojo.Coupon;
import com.anli1.entity.pojo.User;
import com.anli1.entity.vo.R;
import com.anli1.service.ICouponService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author author
 * @since 2024-10-05
 */
@RestController
@RequestMapping("/coupon")
public class CouponController {
@Autowired
    ICouponService iCouponService;

    @PostMapping("/publish")
    @ApiOperation(value = "发卷")
    public R publish(@RequestBody Coupon coupon) {
        return iCouponService.publish(coupon);
    }
    @PostMapping("/lsit")
    @ApiOperation(value = "展示")
    public R publish() {

        return iCouponService.lsit();
    }

}
